package com.mycompany.mywebapp.shared;

public class Equipment {
	protected String name;
	protected String id;
	protected String location;
	protected String type;
	protected String state;

	
	public Equipment(String name, String id, String location, String type, String state){
		this.name=name;
		this.id=id;
		this.location=location;
		this.type=type;
		this.state=state;
	}
	
	

	public Equipment(String name, String id, String location, String type){
		this.name=name;
		this.id=id;
		this.location=location;
		this.type=type;
	}
	
	public Equipment() {
		// TODO Auto-generated constructor stub
	}

	public void SettingType (){

		if (this.getName().equals("Light")){
			this.setType("Eclairage");
		}
		if (this.getName().equals("DimmableLight")){
			this.setType("Eclairage");
		}
		if (this.getName().equals("LightSensor")){
			this.setType("Eclairage");
		}	
		if (this.getName().equals("Thermostat")){
			this.setType("Temperature");
		}
		if (this.getName().equals("Heater")){
			this.setType("Temperature");
		}	
		if (this.getName().equals("Fan")){
			this.setType("Temperature");
		}
		if (this.getName().equals("TemperatureSensor")){
			this.setType("Temperature");
		}
		if (this.getName().equals("Camera")){
			this.setType("Securite");
		}
		if (this.getName().equals("Alarm")){
			this.setType("Securite");
		}
		if (this.getName().equals("DoorLocker")){
			this.setType("Securite");
		}
		if (this.getName().equals("Shutter")){
			this.setType("Securite");
		}
		if (this.getName().equals("MotionDetector")){
			this.setType("Securite");
		}
		if (this.getName().equals("TvRecorder")){
			this.setType("Multimedia");
		}
		if (this.getName().equals("Tv")){
			this.setType("Multimedia");
		}
		if (this.getName().equals("Microphone")){
			this.setType("Multimedia");
		}
		if (this.getName().equals("ElectricMeter")){
			this.setType("Informations");
		}
		if (this.getName().equals("WaterMeter")){
			this.setType("Informations");
		}
		if (this.getName().equals("GazMeter")){
			this.setType("Informations");
		}
		if (this.getName().equals("EnergyMeter")){
			this.setType("Informations");
		}
		if (this.getName().equals("LightMeter")){
			this.setType("Informations");
		}

	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getId(){
		return this.id;
	}
	
	public String getLocation(){
		return this.location;
	}
	
	public String getType(){
		return this.type;
	}
	
	public void setId(String id){
		this.id=id;
	}

	public void setLocation(String location){
		this.location=location;
	}
	
	public void setType(String type){
		this.type=type;
	}
	
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
}
